import moment from "moment";

export const toTimeStamp = (value: string) => {
    const stampTime = value.replace(/-/g, '/');
    const time = new Date(stampTime);
    return time.getTime();
}

/**
 * [getTomorrow 获得明天的格式化日期]
 * @return {[type]} [description]
 */
export const getTomorrow = () => {
    const tomorrow = new Date(new Date().getTime() + 1000 * 60 * 60 * 24)
    return moment(tomorrow).format('YYYY-MM-DD')
}